import request from '@/utils/request'
// 区域
export function getQuYuAPI(params) {
  return request({
    url: 'parking/area/list',
    params
  })
}
export function getAddAPI(data) {
  return request({
    url: 'parking/area',
    method: 'POST',
    data
  })
}
export function writerAddAPI(data) {
  return request({
    url: 'parking/area',
    method: 'PUT',
    data
  })
}
export function delAreaAPI(id) {
  return request({
    url: `parking/area/${id}`,
    method: 'DELETE'
  })
}

// 停车缴费
export function getPaymentAPI(params) {
  return request({
    url: 'parking/payment/list',
    params
  })
}
// 停车计费规则
export function getRuleAPI(params) {
  return request({
    url: 'parking/rule/list',
    params
  })
}
// export function getRuleListAPI() {
//   return request({
//     url: 'parking/area/dropList'

//   })
// }
export function addCarRuleAPI(data) {
  return request({
    url: 'parking/rule',
    method: 'POST',
    data
  })
}
export function getRuleDetailAPI(id) {
  return request({
    url: `/parking/rule/${id}`
  })
}
export function deleteRuleAPI(id) {
  return request({
    url: `/parking/rule/${id}`,
    method: 'DELETE'
  })
}
export function editRuleAPI(data) {
  return request({
    url: `/parking/rule`,
    method: 'put',
    data
  })
}
export function getEnterpriseDetail(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'GET'
  })
}
